package com.zwh.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MvcConfig implements WebMvcConfigurer {

    //通过这里的配置，不需要为每一个访问thmeleaf模板页面开发一个controller求请了
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {

        // 请求路径         跳转视图
       registry.addViewController("login").setViewName("login");
       
       registry.addViewController("regist").setViewName("regist");

       registry.addViewController("addEmp").setViewName("addEmp");

     
       
    }
}
